<template>
<!--  <div>-->
  <div style="width: 100%;min-height: 100vh;">
    <custom-head ref="head" :isBack="true" :backgroundColor="'#9490FB'">
      <block slot="content">自定义头部</block>
    </custom-head>

    <div class="content-bg" :style="'margin-top: '+(headHeight)+'px;'">具体内容</div>
<!--    <div style="padding-top: 0px;background-color: #9490FB; height:100rpx;">具体内容</div>-->
<!--    <div>具体内容</div>-->
  </div>
</template>
<script>
import customHead from "../components/customHead";
export default {
  components: {
    customHead
  },
  data() {
    return {
      headHeight:0, //此高度为了自定义背景色和把具体内容挤下来
    };
  },
  //点击获取用户信息接口返回信息
  methods: {},
  onPullDownRefresh: function () {
    console.log('这是下拉刷新的方法！')
    wx.showNavigationBarLoading() //在标题栏中显示加载

    setTimeout(function () {

      wx.hideNavigationBarLoading() //完成停止加载

      wx.stopPullDownRefresh() //停止下拉刷新

    }, 1500);
  },
  beforeMount() {
  },
  mounted(){
    this.headHeight = this.$refs.head.headHeight;
  },

};
</script>
<style scoped>
  .content-bg{
    background-color: #9490FB ;
    height: 200rpx;
    border-bottom-left-radius: 100rpx;
    border-bottom-right-radius: 100rpx;
  }
</style>


